﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="StudentInfo.aspx.cs" Inherits="ExamAnalysis.Manage.StudentInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <ext:GridPanel ID="ClassInfoGridPanel" runat="server" Frame="true" Height="420" 
        Title="学生信息" Width="600">
        <Store>
            <ext:Store ID="Store2" runat="server">
                <Model>
                    <ext:Model ID="Model1" runat="server" IDProperty="StudentID">
                        <Fields>
                            <ext:ModelField Name="StudentID" />
                            <ext:ModelField Name="StudentCode" />
                            <ext:ModelField Name="StudentName" />
                            <ext:ModelField Name="ClassID" />
                            <ext:ModelField Name="StudentType" />
                            <ext:ModelField Name="Sex" />
                            <ext:ModelField Name="IsValid" />
                            <ext:ModelField Name="AccountID" />
                        </Fields>
                    </ext:Model>
                </Model>
            </ext:Store>
        </Store>
        <ColumnModel>
               <Columns>
                     <ext:Column ID="Column1" runat="server" DataIndex="StudentCode" Text="学号" 
                                            Width="150" />
                     <ext:Column ID="Column2" runat="server" DataIndex="StudentName" Text="姓名" 
                                            Width="150" />
                     <ext:Column ID="Column3" runat="server" DataIndex="Sex" Text="性别" 
                                            Width="50" />
                     <ext:Column ID="Column4" runat="server" DataIndex="StudentType" Text="类别" 
                                            Width="50" />
               </Columns>
         </ColumnModel>
        <SelectionModel>
            <ext:RowSelectionModel ID="RowSelectionModel3" runat="server" Mode="Single" />
        </SelectionModel>
        <TopBar>
            <ext:Toolbar ID="Toolbar1" runat="server">
                <Items>
                    <ext:DropDownField ID="DropDownField1" runat="server" FieldLabel="当前班级" 
                        Text="全部" Width="400">
                        <Component>
                            <ext:GridPanel ID="GridPanel1" runat="server" Height="200">
                                <ColumnModel>
                                    <Columns>
                                        <ext:Column ID="Column13" runat="server" DataIndex="ClassCode" Text="班级代号" 
                                            Width="100" />
                                        <ext:Column ID="Column14" runat="server" DataIndex="ClassName" Text="班级名称" 
                                            Width="150">
                                        </ext:Column>
                                    </Columns>
                                </ColumnModel>
                                <SelectionModel>
                                    <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" Mode="Single" />
                                </SelectionModel>
                                <Store>
                                    <ext:Store ID="Store1" runat="server" >
                                        <Model>
                                            <ext:Model ID="Model4" runat="server" IDProperty="ClassID">
                                                <Fields>
                                                    <ext:ModelField Name="FullName" />
                                                    <ext:ModelField Name="AliasName" />
                                                    <ext:ModelField Name="Type" />
                                                    <ext:ModelField Name="ClassID" />
                                                    <ext:ModelField Name="ClassCode" />
                                                    <ext:ModelField Name="ClassName" />
                                                    <ext:ModelField Name="ClassAliasName" />
                                                    <ext:ModelField Name="IsValid"  />
                                                    <ext:ModelField Name="ClassGrade"/>
                                                    <ext:ModelField Name="EnrollYear" />
                                                </Fields>
                                            </ext:Model>
                                        </Model>
                                    </ext:Store>
                                </Store>
                                <BottomBar>
                                    <ext:Toolbar ID="Toolbar5" runat="server">
                                        <Items>
                                            <ext:Button ID="Button1" runat="server" OnDirectClick="Button_Click" 
                                                Text="选择" />
                                        </Items>
                                    </ext:Toolbar>
                                </BottomBar>
                            </ext:GridPanel>
                        </Component>
                    </ext:DropDownField>
                </Items>
            </ext:Toolbar>
        </TopBar>
        <BottomBar>
            <ext:Toolbar ID="Toolbar6" runat="server">
                <Items>
                    <ext:Button ID="Button2" runat="server" OnDirectClick="Button2_Click" 
                        Text="添加学生" />
                    <ext:Button ID="Button3" runat="server" OnDirectClick="Button3_Click" 
                        Text="更改选中学生信息" />
                    <ext:Button ID="Button4" runat="server" OnDirectClick="Button4_Click" 
                        Text="删除选中学生" />
                </Items>
            </ext:Toolbar>
        </BottomBar>
    </ext:GridPanel>
    <ext:Window 
            ID="FormWindow" 
            runat="server" 
            Title="学生信息编辑" 
            Width="420" 
            Height="300"           
            BodyPadding="10" 
            Resizable="false" 
            Closable="True"
            Layout="Fit" AutoShow="False" HideCollapseTool="False" Hidden="True" HideMode="Visibility">
            <Items>
                <ext:FormPanel 
                    ID="FormPanel1" 
                    runat="server" 
                    Border="false" 
                    BodyStyle="background-color:transparent;"
                    DefaultAnchor="-10"
                    Layout="Form">
                    <Items>
                        <ext:TextField 
                            ID="StudentCode"
                            runat="server" 
                            Name="StudentCode" 
                            MsgTarget="Side" 
                            AllowBlank="false"
                            FieldLabel="学号" 
                            />
                        <ext:TextField 
                            ID="StudentName" 
                            runat="server" 
                            Name="StudentName" 
                            MsgTarget="Side" 
                            AllowBlank="false"
                            FieldLabel="姓名" 
                            />
                        <ext:TextField 
                            ID="StudentType" 
                            runat="server" 
                            Name="StudentType" 
                            MsgTarget="Side" 
                            AllowBlank="false"
                            FieldLabel="学生类别" 
                            />
                        <ext:TextField 
                            ID="Sex" 
                            runat="server" 
                            Name="Sex" 
                            MsgTarget="Side" 
                            AllowBlank="false"
                            FieldLabel="性别" 
                            />
                            <ext:TextField 
                            ID="AccountID" 
                            runat="server" 
                            Name="AccountID" 
                            MsgTarget="Side" 
                            AllowBlank="false"
                            FieldLabel="账号" 
                            />
                            <ext:DropDownField ID="DropDownField2" runat="server" Width="400" FieldLabel="所在班级" Text="请选择">
                            <Component>
                            <ext:GridPanel ID="GridPanel2" runat="server" Height="200">
                                <ColumnModel>
                                    <Columns>
                                        <ext:Column ID="Column23" runat="server" DataIndex="ClassCode" Text="班级代号" 
                                            Width="100" />
                                        <ext:Column ID="Column24" runat="server" DataIndex="ClassName" Text="班级名称" 
                                            Width="150">
                                        </ext:Column>
                                    </Columns>
                                </ColumnModel>
                                <SelectionModel>
                                    <ext:RowSelectionModel ID="RowSelectionModel2" runat="server" Mode="Single" />
                                </SelectionModel>
                                <Store>
                                    <ext:Store ID="Store3" runat="server" >
                                        <Model>
                                            <ext:Model ID="Model5" runat="server" IDProperty="ClassID">
                                                <Fields>
                                                    <ext:ModelField Name="FullName" />
                                                    <ext:ModelField Name="AliasName" />
                                                    <ext:ModelField Name="Type" />
                                                    <ext:ModelField Name="ClassID" />
                                                    <ext:ModelField Name="ClassCode" />
                                                    <ext:ModelField Name="ClassName" />
                                                    <ext:ModelField Name="ClassAliasName" />
                                                    <ext:ModelField Name="IsValid"  />
                                                    <ext:ModelField Name="ClassGrade"/>
                                                    <ext:ModelField Name="EnrollYear" />
                                                </Fields>
                                            </ext:Model>
                                        </Model>
                                    </ext:Store>
                                </Store>
                                <BottomBar>
                                    <ext:Toolbar ID="Toolbar7" runat="server">
                                        <Items>
                                            <ext:Button ID="Button5" runat="server" OnDirectClick="Button5_Click" 
                                                Text="选择" />
                                        </Items>
                                    </ext:Toolbar>
                                </BottomBar>
                            </ext:GridPanel>
                            </Component>
                        </ext:DropDownField>
                    </Items>
                </ext:FormPanel>
            </Items>
            <BottomBar>
        <ext:Toolbar ID="Toolbar3" runat="server">
                    <Items>
                        <ext:Button ID="Button6" runat="server" Icon="Add" Text="添加" Visible="true">
                          <DirectEvents>
                                <Click OnEvent="Add_Click" />
                           </DirectEvents>
                        </ext:Button>      
                         <ext:Button ID="Button7" runat="server" Icon="Accept" Text="更新" Visible="true">
                          <DirectEvents>
                                <Click OnEvent="Change_Click" />
                           </DirectEvents>
                        </ext:Button>              
                        <ext:ToolbarFill ID="ToolbarFill1" runat="server" /> 
                    </Items>
                </ext:Toolbar>
            </BottomBar>
        </ext:Window>
</asp:Content>
